<?
session_start();
$is_login = $_SESSION['is_login'];
?>
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<?
		if ($is_login == "")
		    echo "<script type=\"text/javascript\">var g_is_login = \"false\";</script>";
		else
		    echo "<script type=\"text/javascript\">var g_is_login = \"true\";</script>";
		?>
		<title>My Project Timeline - alpha 0.0.1</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
		<link rel='stylesheet' href='css/styles.css' type='text/css' />
		<link rel="stylesheet" type="text/css" href="libs/yui/button/assets/skins/sam/button.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/container/assets/skins/sam/container.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/calendar/assets/skins/sam/calendar.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/colorpicker/assets/skins/sam/colorpicker.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/menu/assets/skins/sam/menu.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/datatable/assets/skins/sam/datatable.css" />
		<link rel="stylesheet" type="text/css" href="libs/yui/paginator/assets/skins/sam/paginator.css" />
		<link rel="stylesheet" type="text/css" href="css/ie.css" />
		<script src="libs/jquery/jquery-1.3.2.js" type="text/javascript">
		</script>
		<script type="text/javascript" src="libs/yui/yahoo-dom-event/yahoo-dom-event.js">
		</script>
		<script type="text/javascript" src="libs/yui/connection/connection-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/element/element-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/button/button-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/dragdrop/dragdrop-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/container/container-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/calendar/calendar-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/slider/slider-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/colorpicker/colorpicker-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/utilities/utilities.js">
		</script>
		<script type="text/javascript" src="libs/yui/menu/menu-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/datasource/datasource-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/datatable/datatable-min.js">
		</script>
		<script type="text/javascript" src="libs/yui/paginator/paginator-min.js">
		</script>
		<script type="text/javascript">
			Timeline_ajax_url = "libs/timeline_2.3.0/timeline_ajax/simile-ajax-api.js";
			Timeline_urlPrefix = 'libs/timeline_2.3.0/timeline_js/';
			Timeline_parameters = 'bundle=true';
		</script>
		<script src="libs/timeline_2.3.0/timeline_js/timeline-api.js" type="text/javascript">
		</script>
		<script src="libs/timeline_2.3.0/timeline_js/timeline_filter.js" type="text/javascript">
		</script>
		<script src="js/timeline.js" type="text/javascript">
		</script>
		<script src="js/main.js" type="text/javascript">
		</script>
	</head>
	<body onload="onLoad();adjustUI();externalLinks();" class="yui-skin-sam">
		<!-- MessageBox Begin -->
		<div id="div_message_box" class="css_message_box">
			<div class="hd">
				Message Box
			</div>
			<div class="bd">
				<div id="div_message_text">
				</div>
			</div>
		</div>
		<!-- MessageBox End --><!-- Login Status Begin -->
		<div id="loginStatus" style="position:absolute;background:#fff;border:1px dotted black;padding:5px;margin:10px;visibility:hidden">
			<img src="images/signing.gif" title="signing" alt="signing" />- Signing, please wait...
		</div><!-- Login Status End --><!-- Login Panel Begin -->
		<div id="login_panel">
			<a href="#" onclick="showDialogLogin();">Login</a>
		</div>
		<!-- Login Panel End --><!-- Login Dialog Begin -->
		<div id="dialog_login" class="dialog_style">
			<div class="hd">
				Sign in
			</div>
			<div class="bd">
				<form id='form_login' method="post" action="global_functions.php">
					<div>
						<input type="hidden" name="action" value="login" />
						<label for="username">
							Username:
						</label>
						<input class="styleLoginFormat" type="text" id="username" name="username" />
						<br/>
						<label for="password">
							Password:
						</label>
						<input class="styleLoginFormat" type="password" id="password" name="password" />
					</div>
				</form>
			</div>
		</div><!-- Login Dialog End --><!-- Timeline Begin -->
		<div id="my-timeline" style="height: 500px; border: 1px solid #aaa;">
		</div>
		<div class="controls" id="controls">
		</div>
		<!-- Timeline End --><!-- Dashboard Begin -->
		<div id="dashboard" class="map" title="Dashboard">
			<img style="cursor:hand" src="images/add-entry.gif" title="add a new project" alt="add a new project" onclick="createProject();"/><img style="cursor:hand" src="images/category.gif" alt="project category setting" title="project category setting" onclick="showDialogCategory();"/>
		</div><!-- Dashboard End --><!-- Edit Dialog Begin -->
		<div id="div_dialog_edit" class="dialog_style">
			<div class="hd">
				Edit Project<span id="loading_flag"></span>
			</div>
			<div class="bd">
				<form id='form2' method="post" action="global_functions.php">
					<div>
						<input type="hidden" id="id" name="id" /><input type="hidden" id="action" name="action" value="update" />
						<label for="prj_title">
							Title:
						</label>
						<input class="styleInputLongFormat" type="text" id="prj_title" name="prj_title" />
						<br/>
						<label for="owner">
							Owner:
						</label>
						<input class="styleInputLongFormat" type="text" id="owner" name="owner" />
						<br/>
						<label for="start_time">
							Start Time:
						</label>
						<input class="styleInputMiddleFormat" type="text" id="start_time" name="start_time" />
						<button type="button" id="show_start" title="Show Calendar">
							<img src="libs/yui/assets/calbtn.gif" width="18" height="18" alt="Calendar" />
						</button>
						<div id="cal_container">
							<div class="hd">
								Calendar
							</div>
							<div class="bd">
								<div id="cal">
								</div>
							</div>
						</div>
						<label for="end_time">
							End Time:
						</label>
						<input class="styleInputMiddleFormat" type="text" id="end_time" name="end_time" />
						<button type="button" id="show_end" title="Show Calendar">
							<img src="libs/yui/assets/calbtn.gif" width="18" height="18" alt="Calendar" />
						</button>
						<div id="cal_container2">
							<div class="hd">
								Calendar
							</div>
							<div class="bd">
								<div id="cal2">
								</div>
							</div>
						</div>
						<label for="color">
							Color:
						</label>
						<input class="styleInputMiddleFormat" type="text" id="color" name="color" />
						<button type="button" id="show_color_picker" title="Show Color Picker">
							<img src="images/color-picker.gif" width="18" height="18" alt="Color Picker" />
						</button>
						<br/>
						<label for="image">
							Image:
						</label>
						<input class="styleInputLongFormat" type="text" id="image" name="image" />
						<br/>
						<label for="icon">
							Icon:
						</label>
						<input class="styleInputLongFormat" type="text" id="icon" name="icon" />
						<br/>
						<label for="tape_image">
							Tape Image:
						</label>
						<input class="styleInputLongFormat" type="text" id="tape_image" name="tape_image" />
						<br/>
						<label for="page_url">
							Page URL:
						</label>
						<input class="styleInputLongFormat" type="text" id="page_url" name="page_url" />
						<br/>
						<label for="title_link">
							Title Link:
						</label>
						<input class="styleInputLongFormat" type="text" id="title_link" name="title_link" />
						<br/>
						<label for="prj_id">
							Project ID:
						</label>
						<input class="styleInputLongFormat" type="text" id="prj_id" name="prj_id" />
						<br/>
						<label for="complete">
							Complete:
						</label>
						<div id="div_complete">
							<input class="styleInputShortFormat" id="complete" name="complete" />% Done
						</div>
						<label for="is_duration">
							Is Duration:
						</label>
						<select class="styleInputShortFormat" id="is_duration" name="is_duration">
							<option value="true">true</option>
							<option value="false">false</option>
						</select>
						<br/>
						<label for="priority">
							Priority:
						</label>
						<select class="styleInputShortFormat" id="priority" name="priority">
							<option value="0">0</option>
							<option value="1">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
							<option value="5">5</option>
							<option value="6">6</option>
							<option value="7">7</option>
							<option value="8">8</option>
							<option value="9">9</option>
						</select>
						<br/>
						<label for="description">
							Description:
						</label>
						<textarea class="styleInputLongFormat" rows="5" cols="10" style="width:400" id="description" name="description">
						</textarea>
					</div>
				</form>
			</div>
		</div>
		<!-- Edit Dialog End --><!-- Color Picker Begin -->
		<div id="yui-picker-panel" class="dialog_style">
			<div class="hd">
				Please choose a color:
			</div>
			<div class="bd">
				<div class="yui-picker" id="yui-picker">
				</div>
			</div>
			<div class="ft">
			</div>
		</div>
		<!-- Color Picker End --><!-- dialog category begin -->
		<div id="div_dialog_category" class="dialog_style">
			<div class="hd">
				Project Category Setting
			</div>
			<div class="bd">
				<div id="prj_category">
				</div>
			</div>
		</div>
		<!-- dialog category end --><!-- dialog category editor -->
		<div id="div_dialog_category_edit" class="dialog_style">
			<div class="hd">
				Edit Project Category
			</div>
			<div class="bd">
				<form id='form1' method="post" action="global_functions.php">
					<div>
						<input type="hidden" id="cat_inner_id" name="cat_inner_id" /><input type="hidden" id="category_action" name="category_action" />
						<label for="cat_prj_id">
							Project ID:
						</label>
						<input class="styleInputLongFormat" type="text" id="cat_prj_id" name="cat_prj_id" />
						<br/>
						<label for="cat_color">
							Color:
						</label>
						<input class="styleInputMiddleFormat" type="text" id="cat_color" name="cat_color" />
						<br/>
						<label for="cat_icon">
							Icon:
						</label>
						<input class="styleInputLongFormat" type="text" id="cat_icon" name="cat_icon" />
						<br/>
						<label for="cat_tape_image">
							Tape Image:
						</label>
						<input class="styleInputLongFormat" type="text" id="cat_tape_image" name="cat_tape_image" />
						<br/>
						<label for="cat_title_link">
							Title Link:
						</label>
						<input class="styleInputLongFormat" type="text" id="cat_title_link" name="cat_title_link" />
					</div>
				</form>
			</div>
		</div><!-- dialog category editor end -->
		<div class="footer">
			<p>
				Powered by <a href='http://code.google.com/p/project-timeline/' rel="external" title='click to visit homepage of project timeline'>project timeline</a>
				<a href="http://validator.w3.org/check?uri=referer" rel="external"><img src="images/valid-xhtml10-blue.png" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
			</p>
		</div>
	</body>
</html>